<template>
    <h3 :style="{color}">GrandSon-孙子组件</h3>
    <hr>
</template>

<script>

import {defineComponent, inject} from "vue";


export default defineComponent({
    name: "Grandson",
    setup() {

        // 孙子组件接收数据
        let color = inject("color")
        return {
            color
        }
    }
})
</script>

<style scoped>

</style>